var isSymmetric = function(root) {//*
    if(!root)return true
    function compare(left,right){
         if(left===null&&right===null)return true//因为只有是null才能确定true 一层层下去
            if((left===null&&right!==null)||(left!==null&&right==null)){
                return false
            }else if(left.val!==right.val){return false}
            let lCompare=compare(left.left,right.right)
            let rCompare=compare(left.right,right.left)
            return lCompare&&rCompare
    }
    return compare(root.left,root.right)
    };